<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            font-family: "Microsoft YaHei UI Light", 'Helvetica Neue', Arial, 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
            transition: all .2s;
            padding: 0;
            margin: 0;
        }

        button {
            outline: none;
        }

        body {

            width: 100%;
            height: 100%;
        }

        .main {
            width: 1500px;
            display: flex;
            flex-wrap: wrap;
            margin: 0 auto;
            margin-top: 10px;
            overflow-y: auto;
            box-shadow: 0 0 5px rgba(0, 0, 0, .1);

            background-color: rgba(0, 0, 160, .05);
        }

        .picContainer {
            padding: 30px;
            flex: 0 0 20%;
        }

        .photo {
            background: url('https://gitee.com/assets/homepage/illus_education.png') no-repeat;
            background-size: 100% auto;
            background-color: #fff;
            width: 240px;
            margin: 0 auto;
            height: 300px;
            box-shadow: 0 0 5px rgba(0, 0, 0, .1);
            padding-bottom: 5px;
        }

        .photo span.num {
            background: rgba(100, 100, 160, .6);
            color: #fff;
            padding: 5px;
            border-radius: 5px;
            position: relative;
            top: 220px;
            left: 200px;
            font-size: 1.1rem;
            font-weight: bold;
        }

        .photo span.name {
            position: relative;
            top: 250px;
            width: 100%;
            color: #333;
            font-size: 1.1rem;
            display: inline-block;
            text-align: center;
        }

        .photo button {
            position: relative;
            top: 228px;
            left: 200px;
            width: 20px;
            background: none;
            border: none;
            cursor: pointer;
            text-align: center;
        }

        .photo button:hover {
            width: 25px;

        }

        .photo div {
            display: none;
            position: relative;
            color: #555;
            font-size: 1.1rem;
            font-weight: bold;
            top: 20px;
            left: 242px;
            width: 200px;
            padding: 10px;
            height: 200px;
            background: rgba(250, 250, 250, .9);
            box-shadow: 0 0 3px rgba(250, 250, 250, .9);
            z-index: 11;
        }

        .layer {
            position: fixed;
            top: 0px;
            width: 100%;
            height: 100%;
            display: none;
            filter: blur(10px);
            z-index: 10;
            background: rgba(0, 0, 0, .9);
        }
    </style>
</head>

<body>
    <div class="layer"></div>
    <div class="main">
    </div>
    <script>
        for (let index = 0; index < 100; index++) {
            $('.main').append($(
                ' <div class="picContainer">\
                    <div class="photo">\
                        <span class="num">123</span>\
                        <span class="name">咩咩咩咩咩咩咩</span>\
                        <button onclick="showDesc(this);"><img src="icon.png" width="100%" /></button>\
                        <div>\
                            <p>\
                                这是介绍啦啦啦啦啦啦啦啦啦啦啦啦啦啦\
                            </p>\
                        </div>\
                    </div>\
                </div>'
            ));
        }

        function showDesc(e) {
            if (e.nextSibling.nextElementSibling.style.display != 'block') {
                $(e).parent().parent().css({
                    'z-index': 11,
                    'background': 'rgba(200,200,200,.9)',
                    'border-radius': '10px'
                });
                e.nextSibling.nextElementSibling.style.display = 'block';
                e.style['z-index'] = 11;
                $('.layer').show();
            } else {
                e.nextSibling.nextElementSibling.style.display = 'none';
                e.style['z-index'] = 0;
                $(e).parent().parent().css({
                    'z-index': 0,
                    'background': 'none',
                    'border-radius': '10px'
                });
                $('.layer').hide();
            }
        }
    </script>
</body>

</html>